package com.tdkj.model.information;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;

/**
 * XnkyModuleColumn entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "xnky_module_column")
public class BeanModuleColumn extends BaseEntity implements java.io.Serializable {

	// Fields

	private BeanInfoModule infoModule;
	private String columnname;
	private String columntype;

	// Constructors

	/** default constructor */
	public BeanModuleColumn() {
	}

	/** minimal constructor */
	public BeanModuleColumn(long id, BeanInfoModule infoModule) {
		this.setId(id);
		this.infoModule = infoModule;
	}


	public BeanModuleColumn(BeanInfoModule bean, String columnname, String columntype) {
		// TODO Auto-generated constructor stub
		this.setInforModule(bean);
		this.setColumnname(columnname);
		this.setColumntype(columntype);
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "informoduleid", nullable = false)
	public BeanInfoModule getInforModule() {
		return this.infoModule;
	}

	public void setInforModule(BeanInfoModule infoModule) {
		this.infoModule = infoModule;
	}

	@Column(name = "columnname", length = 40)
	public String getColumnname() {
		return this.columnname;
	}

	public void setColumnname(String columnname) {
		this.columnname = columnname;
	}

	@Column(name = "columntype", length = 40)
	public String getColumntype() {
		return this.columntype;
	}

	public void setColumntype(String columntype) {
		this.columntype = columntype;
	}

}